<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <ui:composition template="/template/templateLogin.xhtml">
        <ui:define name="content">  
            <form 
                action="#{request.contextPath}/j_spring_security_check" 
                method="post">
                <h:form 
                    rendered="#{!empty param.error}">
                    <span style="color: red">  
                        Erro ao efetuar o login
                    </span>
                    <br/>
                </h:form>
                <div align="center">
                    <p:messages 
                        id="mLogin" 
                        showDetail="true" 
                        showSummary="true"/>
                    <p:panel 
                        id="panelLogin"
                        header="Bem vindo(a) ao Acesso."
                        style="width: 600px">
                        <h:panelGrid  id="gridLogin"  columns="2">

                            <h:outputText id="loginLabel" value="E-mail:"/>
                            <p:inputText required="true" id="j_username"/>

                            <h:outputText value="Senha: " />  
                            <p:password required="true" id="j_password" /> 


                        </h:panelGrid>
                        <p:panel style="border-color: transparent; color: transparent; background: transparent " >
                            <div align="center">
                                <h:commandButton
                                    value="Entrar" />
                            </div>
                        </p:panel>
                    </p:panel>
                </div>
            </form>
            <h:form>
                <div align="center">
                    <p:commandLink 
                        value="Criar Cadastro?" 
                        ajax="false" 
                        action="/acesso/recuperar_senha.jsf"/>
                </div>
                <br/>
            </h:form>
            <br/>
        </ui:define>
    </ui:composition>
</html>
